package com.lvy.hczn.front.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lvy.hczn.front.system.domain.business.GoodsBox;
import com.lvy.hczn.front.system.domain.business.GoodsBoxDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GoodsBoxDetailMapper extends BaseMapper<GoodsBoxDetail> {

    /**
     * 根据原料查询最先入库的原料
     *
     * @param spuId
     * @return
     * @author yw
     * @date 2022-04-17 16:43:22
     */
    List<GoodsBoxDetail> selectBySpuId(String spuId);

    /**
     * spuId list查询
     *
     * @param list
     * @return
     * @author yw
     * @date 2022-04-17 16:43:22
     */
    List<GoodsBoxDetail> selectBySpuIdList(@Param(value = "list") List<String> list, @Param(value = "clientId") String clientId);

    /**
     * 物理删除
     *
     * @param boxCode
     * @return
     * @author yw
     * @date 2022-03-20 11:31:12
     */
    int delPhysicalByBoxCode(@Param(value = "boxCode") String boxCode);

    /**
     * 查询货箱详情列表
     *
     * @param goodsBoxDetail
     * @return java.util.List<com.lvy.hczn.model.front.GoodsBoxDetail>
     * @author yw
     * @date 2022-07-27 11:28:41
     */
    List<GoodsBoxDetail> selectBoxDetailByBoxCode(@Param(value = "goodsBoxDetail") GoodsBoxDetail goodsBoxDetail);

    /**
     * 根据指令类型查询货箱信息
     *
     * @param type
     * @return
     */
    List<GoodsBoxDetail> selectByUpOrDownPolicyType(@Param(value = "type") String type, @Param(value = "processType") Integer processType);

    /**
     * 根据出库单查询货箱详情列表
     *
     * @param outboundOrderCode
     * @return
     */
    List<GoodsBoxDetail> selectTransferSortDoneByOutBoundOrderCode(@Param(value = "outboundOrderCode") String outboundOrderCode);

    /**
     * 查询货箱信息列表
     *
     * @param warehouseNumber
     * @param spuIdList
     * @return 货箱信息集合
     */
    List<GoodsBoxDetail> selectByWareHouseNumberAndSpuIdList(@Param(value = "warehouseNumber") String warehouseNumber, @Param(value = "spuIdList") List<String> spuIdList);

    List<GoodsBoxDetail> selectGoodsBoxDetailList(@Param(value = "goodsBoxDetail") GoodsBoxDetail goodsBoxDetail);
}
